<template>
  <div>
      <mc-model-form :model.sync="formData"  method="post" action="/youyaboot-admin/magical_lowcode/crud/user/insert">
      		<el-form-item label="姓名">
      			<el-input v-model="formData.userName" placeholder="请输入内容"></el-input>
      		</el-form-item>
      		<el-form-item label="性别">
      			<el-radio-group v-model="formData.sex">
      				<el-radio label="0">女</el-radio>
      				<el-radio label="1">男</el-radio>
      			</el-radio-group>
      		</el-form-item>
      		<el-form-item label="创建日期">
      			<el-date-picker v-model="formData.createTime" :editable="true" :clearable="true" type="datetime" format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
      		</el-form-item>
      		<el-form-item label="年龄">
      			<el-slider v-model="formData.age"></el-slider>
      		</el-form-item>
      	</mc-model-form>
      	<el-button @click="printMe">打印</el-button>
      	<el-button @click="submitMe">提交</el-button>
  </div>
</template>

<script>
import McModelForm from './components/McModelForm'
export default {
    data(){
      return {
        formData:{
            userName:"1",
            sex:"2",
            createTime:"",
            age:3,
        }
      }
    },
    components:{
      McModelForm,
    },
    methods:{
        printMe(){
            console.log(JSON.stringify(this.formData))
        },
        submitMe:function(){
            this.formData = {};
        }
    }
}
</script>

<style>

</style>
